package com.example.spdemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
public class SpdemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpdemoApplication.class, args);
    }

    @GetMapping("/")
    public String home() {
        return "<h1>欢迎使用用户管理系统</h1>" +
               "<p>可用的API接口:</p>" +
               "<ul>" +
               "<li>GET /user - 获取所有用户</li>" +
               "<li>GET /user/{id} - 获取特定用户</li>" +
               "<li>POST /user - 创建新用户</li>" +
               "<li>PUT /user/{id} - 更新用户</li>" +
               "<li>DELETE /user/{id} - 删除用户</li>" +
               "</ul>";
    }

}